<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FreeRTOS Addons: cpp_freertos::ReadWriteLockPreferReader Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">FreeRTOS Addons
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecpp__freertos.html">cpp_freertos</a></li><li class="navelem"><a class="el" href="classcpp__freertos_1_1_read_write_lock_prefer_reader.html">ReadWriteLockPreferReader</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcpp__freertos_1_1_read_write_lock_prefer_reader-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">cpp_freertos::ReadWriteLockPreferReader Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="read__write__lock_8hpp_source.html">read_write_lock.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cpp_freertos::ReadWriteLockPreferReader:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classcpp__freertos_1_1_read_write_lock_prefer_reader.png" usemap="#cpp_5Ffreertos::ReadWriteLockPreferReader_map" alt=""/>
  <map id="cpp_5Ffreertos::ReadWriteLockPreferReader_map" name="cpp_5Ffreertos::ReadWriteLockPreferReader_map">
<area href="classcpp__freertos_1_1_read_write_lock.html" alt="cpp_freertos::ReadWriteLock" shape="rect" coords="0,0,252,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6eb22bff8d46df415b06d54cb184bab4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock_prefer_reader.html#a6eb22bff8d46df415b06d54cb184bab4">ReaderLock</a> ()</td></tr>
<tr class="separator:a6eb22bff8d46df415b06d54cb184bab4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc44f201f624d20840c9b983f8496d36"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock_prefer_reader.html#abc44f201f624d20840c9b983f8496d36">ReaderUnlock</a> ()</td></tr>
<tr class="separator:abc44f201f624d20840c9b983f8496d36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a120177712ba0377cabbe79768106b8af"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock_prefer_reader.html#a120177712ba0377cabbe79768106b8af">WriterLock</a> ()</td></tr>
<tr class="separator:a120177712ba0377cabbe79768106b8af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe36acbc0b404d268cba7b205c1773be"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock_prefer_reader.html#abe36acbc0b404d268cba7b205c1773be">WriterUnlock</a> ()</td></tr>
<tr class="separator:abe36acbc0b404d268cba7b205c1773be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classcpp__freertos_1_1_read_write_lock"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcpp__freertos_1_1_read_write_lock')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classcpp__freertos_1_1_read_write_lock.html">cpp_freertos::ReadWriteLock</a></td></tr>
<tr class="memitem:a6717282a541aca49a6c1df7968fef3de inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a6717282a541aca49a6c1df7968fef3de">ReadWriteLock</a> ()</td></tr>
<tr class="separator:a6717282a541aca49a6c1df7968fef3de inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09a4e382675ac3d576a5f93393a7a6b0 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a09a4e382675ac3d576a5f93393a7a6b0">~ReadWriteLock</a> ()</td></tr>
<tr class="separator:a09a4e382675ac3d576a5f93393a7a6b0 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab824802f557190853843ef28d4d40af3 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#ab824802f557190853843ef28d4d40af3">ReaderLock</a> ()=0</td></tr>
<tr class="separator:ab824802f557190853843ef28d4d40af3 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f1763bbcdb0caecd49efbb11b646203 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a3f1763bbcdb0caecd49efbb11b646203">ReaderUnlock</a> ()=0</td></tr>
<tr class="separator:a3f1763bbcdb0caecd49efbb11b646203 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a399370c41c10fb27caceb93ecaea62b5 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a399370c41c10fb27caceb93ecaea62b5">WriterLock</a> ()=0</td></tr>
<tr class="separator:a399370c41c10fb27caceb93ecaea62b5 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b31619582053cff11b070a8d9c7e004 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a6b31619582053cff11b070a8d9c7e004">WriterUnlock</a> ()=0</td></tr>
<tr class="separator:a6b31619582053cff11b070a8d9c7e004 inherit pub_methods_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_classcpp__freertos_1_1_read_write_lock"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classcpp__freertos_1_1_read_write_lock')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classcpp__freertos_1_1_read_write_lock.html">cpp_freertos::ReadWriteLock</a></td></tr>
<tr class="memitem:a2da066fa1e83baa1c912fc67c48ea48b inherit pro_attribs_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a2da066fa1e83baa1c912fc67c48ea48b">ReadCount</a></td></tr>
<tr class="separator:a2da066fa1e83baa1c912fc67c48ea48b inherit pro_attribs_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7046a504a0a711b560b2b29d77200f90 inherit pro_attribs_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">SemaphoreHandle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a7046a504a0a711b560b2b29d77200f90">ReadLock</a></td></tr>
<tr class="separator:a7046a504a0a711b560b2b29d77200f90 inherit pro_attribs_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04655444d9f959cce015ef5e6e98658f inherit pro_attribs_classcpp__freertos_1_1_read_write_lock"><td class="memItemLeft" align="right" valign="top">SemaphoreHandle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a04655444d9f959cce015ef5e6e98658f">ResourceLock</a></td></tr>
<tr class="separator:a04655444d9f959cce015ef5e6e98658f inherit pro_attribs_classcpp__freertos_1_1_read_write_lock"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Concrete derived class that implements a Reader/Writer lock that favors the Readers. That is, with enough aggressive readers, a Writer may starve. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a6eb22bff8d46df415b06d54cb184bab4" name="a6eb22bff8d46df415b06d54cb184bab4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6eb22bff8d46df415b06d54cb184bab4">&#9670;&#160;</a></span>ReaderLock()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ReadWriteLockPreferReader::ReaderLock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Take the lock as a Reader. This allows multiple reader access. </p>

<p>Implements <a class="el" href="classcpp__freertos_1_1_read_write_lock.html#ab824802f557190853843ef28d4d40af3">cpp_freertos::ReadWriteLock</a>.</p>

</div>
</div>
<a id="abc44f201f624d20840c9b983f8496d36" name="abc44f201f624d20840c9b983f8496d36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc44f201f624d20840c9b983f8496d36">&#9670;&#160;</a></span>ReaderUnlock()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ReadWriteLockPreferReader::ReaderUnlock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Unlock the Reader. </p>

<p>Implements <a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a3f1763bbcdb0caecd49efbb11b646203">cpp_freertos::ReadWriteLock</a>.</p>

</div>
</div>
<a id="a120177712ba0377cabbe79768106b8af" name="a120177712ba0377cabbe79768106b8af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a120177712ba0377cabbe79768106b8af">&#9670;&#160;</a></span>WriterLock()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ReadWriteLockPreferReader::WriterLock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Take the lock as a Writer. This allows only one thread access. </p>

<p>Implements <a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a399370c41c10fb27caceb93ecaea62b5">cpp_freertos::ReadWriteLock</a>.</p>

</div>
</div>
<a id="abe36acbc0b404d268cba7b205c1773be" name="abe36acbc0b404d268cba7b205c1773be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe36acbc0b404d268cba7b205c1773be">&#9670;&#160;</a></span>WriterUnlock()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ReadWriteLockPreferReader::WriterUnlock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Unlock the Writer. </p>

<p>Implements <a class="el" href="classcpp__freertos_1_1_read_write_lock.html#a6b31619582053cff11b070a8d9c7e004">cpp_freertos::ReadWriteLock</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="read__write__lock_8hpp_source.html">read_write_lock.hpp</a></li>
<li>src/freertos-addon/c++/cread_write_lock.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
